#!/bin/sh
# Called by "git commit" with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.

PATH=$PATH:/usr/local/bin:/usr/local/sbin

echo --------------------------------------------
echo Starting Git hook: pre-commit

echo Invoking node scripts/node_modules/lint-staged/index.js
node scripts/node_modules/lint-staged/index.js

if [ $? -ne 0 ]; then
  # the lint-staged script above will print out appropriate errors
  exit 1
fi

echo Finished Git hook: pre-commit
echo --------------------------------------------